// hwincontainercontrol.h

#ifndef __HWINCONTAINERCONTROL_H__
#define __HWINCONTAINERCONTROL_H__

#include "hwindef.h"
#include "hwinmessage.h"
#include "hwinscrollablecontrol.h"

namespace harlinn
{
    namespace windows
    {
        class IContainerControl
        {
        public:
            virtual std::shared_ptr<const Control> ActiveControl() const = 0;
            virtual std::shared_ptr<Control> ActiveControl() = 0;
            virtual void SetActiveControl(std::shared_ptr<Control> theControl) = 0;
            virtual void ActivateControl(std::shared_ptr<Control> theControl) = 0;
        };

        class ContainerControl : public ScrollableControl, public IContainerControl
        {
            std::weak_ptr<Control> activeControl;
        public:
            typedef ScrollableControl Base;
            HWIN_EXPORT ContainerControl( );

            HWIN_EXPORT virtual std::shared_ptr<const Control> ActiveControl() const;
            HWIN_EXPORT virtual std::shared_ptr<Control> ActiveControl();

            HWIN_EXPORT virtual void SetActiveControl(std::shared_ptr<Control> theControl);
            HWIN_EXPORT virtual void ActivateControl(std::shared_ptr<Control> theControl);

        };
    }
}

#endif // __HWINCONTAINERCONTROL_H__